home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / apploggr / readme.txt < prev    next >
Encoding:
Text File  |  1999-05-30  |  7.2 KB  |  151 lines

  1. AppLogger.dll version 1.1.5 Copyright 1999 Craig Gill
  2.  
  3. This .dll is an ole in-process .dll or activex .dll.  It's functions perform
  4. application log file logging as well as various other useful functions that 
  5. you can enhance your projects with.
  6.  
  7. Revision History:
  8.  
  9. 05/29/1999 AppLogger.dll version 1.1.5
  10. --------------------------------------
  11. -AppLogger.dll is no longer freeware and now requires registration.
  12.  * Register this software at Regnow.com:  https://www.regnow.com/softsell/nph-softsell.cgi?item=2305-1
  13.  Registration entitles you to free technical support via email and free
  14.  upgrades to the product for one (1) major version.
  15. -AppLogger.dll now includes a great error handling product:
  16.  VB Debug Workshop  by Rodrigo Rodriguez  http://www.gateway-cs.net/rrdn/
  17. -AppLogger.AddToRecentDocuments method now correctly working.
  18.  
  19.  
  20. 05/07/1999 AppLogger.dll version 1.1.4
  21. --------------------------------------
  22. -This .dll is now compiled with Visual Basic 6.0 Service Pack 2.
  23. -Added .CopyFiles method that can copy a single file or a file specification using
  24.  Windows api's. Returns "0" if the method fails, otherwise it returns the number of
  25.  files copied.
  26.  
  27.  
  28. 04/15/1999 AppLogger.dll version 1.1.3
  29. --------------------------------------
  30. -Made AppLogger.dll fully Year 2000 compliant.
  31. -It is now compiled with Visual Basic 6.0 Service Pack 1.
  32. -AppLogger.dll now calculates free drive space correctly on FAT16 and FAT32 formatted drives.
  33. -*applogger.AddToRecentDocuments is a method still being tested but should not cause any problems
  34.  should you decide to use it.
  35. -Added .INI_ReadINT method to read integers from .ini files. Returns "0" if no integer found.
  36.  
  37.  
  38. 11/02/1997 AppLogger.dll version 1.1.2 
  39. --------------------------------------
  40. -Fixed a path problem with the .LogFileName and .INI_PathToINI properties.  Those properties now
  41.  work whether you specify them as C:\APP-PATH\WHATEVER.LOG or WHATEVER.LOG, WHATEVER.LOG assumes
  42.  the current directory path.
  43. -Fixed .DiskFreeSpace property to return the free drive space whether the .LogFileName property is 
  44.  set or not.  If it is not set, it return's the free drive space on the C: drive.
  45. -Improved various error handler routines.
  46. -Recompiled the .dll with Instancing set to GlobalMultiUse, therefore you do not need the dim applog as applog or set applog=new applog 
  47.  lines in your project, it is now globaly available and exposes to events (which are not functional yet).
  48. -Changed the name of the .INI_Path property to .INI_PathToINI.
  49.  
  50.  
  51. File Specific's:
  52. AppLogger.dll  184k  05/29/1999  05:41am CST
  53.  
  54.  
  55. Exported Methods,Properties, and Events
  56. ---------------------------------------
  57.  
  58. Methods:
  59. .AddToRecentDocuments - Adds a file specification to the Windows Recent documents list or clears all entries.
  60. .CopyFiles - Copies a single file or a file specification. Returns num of files copied.
  61. .DeleteLogFile - Deletes the current file that is in the .LogFileName property
  62. .EndLogFileEvents - Perform's the last write to the log file indicating what time logging has been stopped
  63. .WriteEventToLogFile - Perform's a write to the log file in the .LogFileName property
  64. .DeleteToRecycleBin - Deletes a file to the RecycleBin, returns TRUE if successful
  65. .DiskFreeSpace - Calculates free disk space on the drive that contains the log file, returns a long number
  66. .INI_ReadINT - Reads an integer from a private .ini file. Returns "0" if no integer found.
  67. .INI_ReadString - Reads a string from a private .ini file
  68. .INI_WriteString - Writes a string to a private .ini file, if the named one does not exist then it will be created
  69. .StripPath - Returns the filename from a full file path
  70.  
  71. Properties:
  72. .DoesLogFileExist - (Boolean) Return's a boolean answer if the .LogFileName file exists
  73. .LogFileName - (String) Sets the current file name to be used for the log file, specify the filename in the full path
  74. .MaximumLogFileSize - (LONG) Sets the maximum size the log file can get in bytes, but represented in the app as a LONG number
  75. .OverwriteLogFile - (Boolean) Tell's AppLogger.dll that it can overwrite the current log file
  76. .SizeOfCurrentLogFile - (LONG) Returns the current size of the log file in bytes, but represented in the application as a LONG number
  77. .INI_PathToINI - (String) Sets the current .ini file, specify the filename in the full path
  78.  
  79. Events:
  80. .ErrorWritingToLogFile - Will be implemented in a future version, does not effect funtionality of the current version.
  81. .SuccessfulWriteToLogFile - Will be implemented in a future version, does not effect funtionality of the current version.
  82.  
  83.  
  84. Here's is some basic code to help get you started using the .dll:
  85.  
  86. Installation Instructions:
  87. You must first register the .dll by typing regsvr32 AppLogger.dll at the DOS prompt in the directory that AppLogger.dll will reside, or
  88. you can run the included batch file Register_Control.bat.
  89. Then in the VB5/6 IDE you must click Project, Components, and check-mark AppLogger.
  90.  
  91. ____________________________________________________
  92. Option Explicit
  93.  
  94.  
  95. Private Sub Form_Load()
  96.  
  97. Dim result As Long
  98. Dim ds
  99.  
  100. applogger.AddToRecentDocuments ("c:\temp\somefile.txt") 'Adds a file to Start, Documents
  101. result = applogger.CopyFiles("C:\temp\", "C:\newdir\", "*.txt") 'Returns num of files copied
  102. applogger.LogFileName = "c:\temp\testLogFilename.log" 'Or you can specify as "testlogfilename.log"
  103. applogger.INI_Path = "c:\temp\testfile.ini" 'Or you can specify as "testfile.ini"
  104. applogger.MaximumLogFileSize = 300000  'Maximum size can be is 2meg or 2000000 in LONG notation
  105. applogger.WriteEventToLogFile ("This is test1") 'Writes something to the log file
  106. result = applogger.INI_WriteString("TestSection2", "TestKey2", "This is a test") 'Returns LONG value, 0 if unsuccessful
  107. MsgBox applogger.INI_ReadString("TestSection2", "TestKey2")
  108. MsgBox applogger.StripPath("C:\temp\testfile.ini")
  109. ds = Format$(applogger.DiskFreeSpace, "###,###,###,##0")
  110. MsgBox ds
  111.  
  112. End Sub
  113.  
  114. Private Sub DeleteFile_Click()
  115.     Dim x As String
  116.     Dim result As Boolean
  117.     x = applogger.LogFileName
  118.     result = applogger.DeleteToRecycleBin(x) 'Deletes a file to the RecycleBin with NO confirmation
  119.     MsgBox result
  120. End Sub
  121.  
  122. Private Sub Form_Terminate()
  123.     applogger.EndLogFileEvents
  124. End Sub
  125. _____________________________________________________
  126.  
  127.  
  128. Sample Output:
  129.  
  130. _____________________________________________________
  131. AppLogger Logfile started 6:29:47 PM 04/15/1999
  132.  
  133. 04/15/1999 6:29:47 PM - test1
  134. 04/19/1999 6:00:29 PM - test1
  135. 04/19/1999 6:02:08 PM - test1
  136. _____________________________________________________
  137.  
  138. * Note #1:  AppLogger does check for free drive space anytime a write to disk operation is performed
  139. and if your free drive space is LESS than the property .MaximumLogFileSize then you will get a warning
  140. but the operation will still continue unless you have 0 drive space free then in that case it returns the
  141. warning + an error.  .MaximumLogFileSize's default value is 30000 or 30k if you do not specify it's value.
  142.  
  143. * Note #2:  This activex .dll was created using VB6 with Service Pack 2.
  144.  
  145.  
  146. Since this is just version 1.1.5 of the .dll I plan to add more functionality
  147. to the AppLogger.dll and more help to this readme.txt file.
  148.  
  149.  
  150. You can contact me directly for help or bug reports or to just comment on it:
  151. craig_gill@email.com